﻿/******************************************************************************
* File description: BoxFailureInfo.qml
* Function: 强制停止弹窗（设备长时间未回复指令时，用户可强行停止实验）
* Current Version: 1.0.0
* Author: JNN
* Date: 2025-07-01
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/

import QtQuick 2.0
import "../components"

CustomPopupBox {

    id: root

    title: "提示"
    height: 270*dp; width: 400*dp

    contentItem: Item{

        CustomImage{
            source: "qrc:/picture/msgWarning.png"
            height: 50*dp; width: 50*dp
            anchors.horizontalCenter: anchors.horizontalCenter
            y: 20*dp
        }

        Text{
            height: 100*dp
            lineHeight: 1.3
            font.pixelSize: config.fontsize
            anchors.horizontalCenter: parent.horizontalCenter
            y: 80*dp
            text: "设备响应超时，是否终止实验?"
        }

        Row{
            height: 40*dp
            anchors.horizontalCenter: parent.horizontalCenter
            y: 100*dp
            width: parent.width
            CustomButton{
                title: "继续下一步"
                defaultMode1: true
                onClicked: {
                    root.close()
                }
            }
            CustomButton{
                title: "强制停止"
                button_color: "#FF9478"
                onClicked: {
                    CommunicationMethod.forcedStop()
                    root.close()
                }
            }
        }
    }




}
